<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:ctg="http://www.crotouristguide.com/taglib"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:c="http://java.sun.com/jstl/core">

<ui:component>

	<rich:dataGrid columns="2" value="#{dogadjaji}" var="d" cellpadding="0"
		cellspacing="0" elements="4" styleClass="list50" width="100%"
		columnClasses="top,top">
		<h:panelGroup>
			<s:div styleClass="leftm">
				<h:outputLink
					value="#{application.contextPath}/guides/mjesta/mjesto.seam">
					<f:param name="idMjesta" value="#{d.mjesto.idMjesta}" />
					<f:param name="l" value="#{currentLang}" />
					<f:param name="title" value="#{titleAction.getUrlTitle(mjesto)}" />
					<img alt="#{messages['label.image.alt']} #{d.mjesto.naziv}"
						width="70" height="50" src="#{slikaAction.getPocSlikaPath(d,'s')}">
					</img>
				</h:outputLink>
			</s:div>
			<s:div styleClass="left">
				<h:outputText
					value="#{stringUtil.formatDate('dd.MM.yy',d.datumOd)}-#{stringUtil.formatDate('dd.MM.yy',d.datumDo)}" />
				<br />
				<h4><h:outputLink
					value="#{application.contextPath}/guides/mjesta/mjesto.seam">
					<f:param name="idMjesta" value="#{d.mjesto.idMjesta}" />
					<f:param name="l" value="#{currentLang}" />
					<c:set value="#{d.getOpis(locale.language).naziv}" var="naziv" />
					<h:outputText value="#{naziv}" /> <h:outputText
						value=", " rendered="#{naziv.length() > 0}" /> <h:outputText
						value="#{d.mjesto.naziv}" />
				</h:outputLink></h4>
			</s:div>
			<br class="clearb" />
			<c:set var="opis" value="#{stringUtil.substring(d.getOpis(currentLang).opis,200)}" />
			<f:subview rendered="#{opis != null}">
				<p class="text11"><h:outputText value="#{opis}" /> <h:outputLink
					styleClass="new-window" value="http://#{d.www}"
					rendered="#{d.www != null}">
					<h:outputText value="#{messages['label.link.more']}" />
				</h:outputLink></p>
			</f:subview>
		</h:panelGroup>
		<br class="clearb" />
	</rich:dataGrid>
	<h:outputLink id="pnlDogadjaji"
		value="#{application.contextPath}/guides/dogadjaji/timeline.seam">
		<f:param name="l" value="#{currentLang}" />
		<h:outputText value="#{messages['label.link.more.events']}" />
	</h:outputLink>


	<script type="text/javascript">
		 jQuery(function() {	 
			 jQuery('#pnlDogadjaji').click(function() {
				new Boxy('<iframe frameborder="0" marginheight="0" marginwidth="0" src="' + this.href + '"></iframe>',{title:'#{messages["title.dogadjaji"]}',modal:true}).resize(850,640);
				return false; 
			 });
		 });
	 </script>
</ui:component>

</html>